package ccpv;



import java.util.ArrayList;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class TestUtilities {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testMakePeople() {
		ArrayList<NamedArrayList<IndexedParameter>> features = new ArrayList<NamedArrayList<IndexedParameter>>();
		NamedArrayList<IndexedParameter> featCat1 = new NamedArrayList<IndexedParameter>("Race");
		NamedArrayList<IndexedParameter> featCat2 = new NamedArrayList<IndexedParameter>("Religion");
		NamedArrayList<IndexedParameter> featCat3 = new NamedArrayList<IndexedParameter>("Origin");
		NamedArrayList<IndexedParameter> featCat4 = new NamedArrayList<IndexedParameter>("Language");
		featCat1.add(new IndexedParameter(0,0.3));
		featCat1.add(new IndexedParameter(1,0.5));
		featCat1.add(new IndexedParameter(2,0.2));
		featCat2.add(new IndexedParameter(0,0.7));
		featCat2.add(new IndexedParameter(1,0.2));
		featCat2.add(new IndexedParameter(2,0.1));
		featCat3.add(new IndexedParameter(0,0.1));
		featCat3.add(new IndexedParameter(1,0.8));
		featCat3.add(new IndexedParameter(2,0.1));
		featCat4.add(new IndexedParameter(0,0.7));
		featCat4.add(new IndexedParameter(1,0.2));
		featCat4.add(new IndexedParameter(2,0.1));	
		features.add(featCat1);
		features.add(featCat2);
		features.add(featCat3);
		features.add(featCat4);
		
		int num = 100;
		ArrayList<Person> people = Utilities.makePeople(features, num);
		for(Person p1 : people) {
			System.out.println(p1.toString());
		}
	}
	


}
